package com.xiaotu.common;

import com.alibaba.fastjson.JSONArray;

import java.util.HashMap;
import java.util.Map;

/**
 * @author zhangxiao
 * @create 2021-01-17 12:16
 */
public class PayloadData {

    private static final Map<String, Object> PAYLOAD_DATA = new HashMap<>();

    public static void setKeyVal(String key, Object val) {
        PAYLOAD_DATA.put(key, val);
    }

    public static String toJson() {
        return JSONArray.toJSON(PAYLOAD_DATA).toString();
    }

}
